﻿<local:DocumentBase x:Class="WPFExcelReport.QFTAB50"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:INTEX.DataBase"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:wep="clr-namespace:WPFExcelReport"
                    Height="700" Width="1024" 
                    FontSize="16"
                    Loaded="Window_Loaded"
                    Title="QFTAB50"  
     >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <db:SETINTEXDB  x:Key="SetData" />
        <CollectionViewSource   x:Key="vwABKOPF" Source="{Binding Path=ABKOPF,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwABPOS" Source="{Binding Path=ABPOS,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwWASTAMM" Source="{Binding Path=WASTAMM,Source={StaticResource SetData}}" />
    </local:DocumentBase.Resources>
    <Grid   >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="74" />
            <RowDefinition Height="157*" />
            <RowDefinition Height="231*" />
            <RowDefinition Height="55*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="79*"></ColumnDefinition>
            <ColumnDefinition Width="361*" />
            <ColumnDefinition Width="207*"></ColumnDefinition>
            <ColumnDefinition Width="233*" />
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0"
            Grid.ColumnSpan="4" Orientation="Horizontal" >            
            <TextBlock FontSize="18"  Height="40"   Width="59" Name="txt1" Margin="0,0,0,0" Text="生产单" />
            <TextBox Background="Yellow"  FontSize="18"  Height="36"   Width="40" Name="txtABPAUFKRS" CharacterCasing="Upper" Margin="10,0,0,0" Text="" />
            <TextBox Background="Green"  FontSize="18" Height="36"    Width="80" Name="txtABPAUFLFD"   Margin="15,0,0,0" Text="" />
            <TextBox Visibility="Hidden"  Background="Green"  FontSize="18" Height="36"    Width="60" Name="txtABPAUFPOS"   Margin="15,0,0,0" Text="" />
            <Button FontSize="18" Content="查询" Height="40" Margin="20,0,0,0" Name="butGetData" Click="btnQuery_Click"></Button>
            <Button Content="打印"  FontSize="18" Height="40" Margin="20,0,0,0"  Name="btnPrint" Width="Auto" Click="btnPrint_Click"/>
        </StackPanel>
        <DataGrid CanUserReorderColumns="True"  
                  CanUserResizeRows="True" CanUserSortColumns="True"                  
                  AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                  IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                  ItemsSource="{Binding Source={StaticResource ResourceKey=vwABPOS}}"  x:Name="ABPOSDataGrid" 
                  Grid.ColumnSpan="4" Margin="0,1,0,0" Grid.Row="2">
            <DataGrid.Columns>
                <DataGridTextColumn Header="生" Binding="{Binding ABPAUFKRS}" Width="40"/>
                <DataGridTextColumn Header="产" Binding="{Binding ABPAUFLFD}" Width="80"/>
                <DataGridTextColumn Header="单" Binding="{Binding ABPAUFPOS}" Width="40"/>
                <DataGridTextColumn Header="品种" Binding="{Binding ABPART}" Width="160"/>
                <DataGridTextColumn Header="版本" Binding="{Binding ABPVAR}" Width="40"/>
                <DataGridTextColumn Header="色号" Binding="{Binding ABPFARBE}" Width="80"/>
                <DataGridTextColumn Header="整理" Binding="{Binding ABPBESCHICH}" Width="80"/>
                <DataGridTextColumn Header="KG" Binding="{Binding Path=ABPSOLLMENGE6, Converter={StaticResource ResourceKey=d100}}" Width="60"/>
                <DataGridTextColumn Header="开始" Binding="{Binding ABPSTARTDAT}" Width="80"/>
                <DataGridTextColumn Header="交期" Binding="{Binding ABPENDDAT}" Width="80"/>
                <DataGridTextColumn Header="行备注" Binding="{Binding REMARK, Converter={StaticResource ResourceKey=gb2312}}" Width="200"/>
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</local:DocumentBase>
